package com.wjc.train.business.mapper;

import com.wjc.train.business.entity.SkToken;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.wjc.train.business.req.SkTokenQueryReq;
import com.wjc.train.business.resp.SkTokenQueryResp;
import org.apache.ibatis.annotations.Param;

import java.util.Date;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author Guessed
 * @since 2023-09-01
 */
public interface SkTokenMapper extends BaseMapper<SkToken> {

  IPage<SkTokenQueryResp> queryList(@Param("page") IPage<SkTokenQueryResp> page,
                                       @Param("sktokenQueryReq") SkTokenQueryReq sktokenQueryReq);

  int decrease(@Param("trainDate")Date trainDate,
               @Param("trainCode") String trainCode,
               @Param("decreaseNum") int decreaseNum);
}
